<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>客户池管理</title>
    <#include "../common/link.ftl">


</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <#include "../common/navbar.ftl">
    <!--菜单回显-->
    <#assign currentMenu="customer_pool"/>

    <#include "../common/menu.ftl">
    <div class="content-wrapper">
        <section class="content-header">
            <h1>客户池管理</h1>
        </section>
        <section class="content">
            <div class="box">
                <!--高级查询--->
                <div style="margin: 10px;">
                    <form class="form-inline" id="searchForm" action="/customer/poolList.do" method="post">
                        <input type="hidden" name="currentPage" id="currentPage" value="1">
                        <div class="form-group">
                            <label for="keyword">关键字:</label>
                            <input type="text" class="form-control" id="keyword" name="keyword"
                                   placeholder="请输入姓名/邮箱">
                        </div>

                        <@shiro.hasAnyRoles name="ADMIN,Market_Manager">
                            <div class="form-group">
                                <label for="seller"> 销售人员:</label>
                                <select class="form-control" id="seller" name="sellerId">
                                    <option value="-1">全部</option>
                                <#list sellers as s>
                                   <option value="${s.id}">${s.name}</option>
                                </#list>
                                </select>
                                <script>
                                    $("#seller option[value='${(qo.sellerId)!}']").prop("selected", true);
                                </script>
                            </div>
                        </@shiro.hasAnyRoles>

                        <button id="btn_query" class="btn btn-primary"><span class="glyphicon glyphicon-search"></span>
                            查询
                        </button>
                        <a href="#" class="btn btn-success btn-input">
                            <span class="glyphicon glyphicon-plus"></span> 添加
                        </a>
                        <script>
                            //导出的按钮
                            $(".btn-import").click(function () {
                                //弹出模态框
                                $("#importModal").modal('show');
                            })
                        </script>
                    </form>
                </div>
                <table class="table table-hover table-bordered">
                    <thead>
                    <tr>
                        <th>编号</th>
                        <th>姓名</th>
                        <th>电话</th>
                        <th>QQ</th>
                        <th>职业</th>
                        <th>来源</th>
                        <th>销售员</th>
                        <th>状态</th>
                        <th>录入时间</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                        <#list pageInfo.list as customer>
                                <tr>
                                    <td>${customer_index+1}</td>
                                    <td>${(customer.name)!}</td>
                                    <td>${(customer.tel)!}</td>
                                    <td>${(customer.qq)!}</td>
                                    <td>${(customer.job.title)!}</td>
                                    <td>${(customer.source.title)!}</td>
                                    <td>${(customer.seller.name)!}</td>
                                    <td>${(customer.statusName)!}</td>
                                    <td>${(customer.inputTime?string('yyyy-MM-dd'))!}</td>
                                    <td>
                                        <a href="#" data-json='${customer.json}'
                                           class="btn btn-info btn-xs btn-input">
                                            <span class="glyphicon glyphicon-pencil"></span> 编辑
                                        </a>
                                    </td>
                                </tr>
                        </#list>
                </table>
                <!--分页-->
                <#include "../common/page.ftl">
            </div>
        </section>
    </div>
    <#include "../common/footer.ftl">
</div>
</body>
</html>
